﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using Dogshow.Model;
using Dogshow.Web.Requests;

namespace Dogshow.Web.Services
{
    [ServiceContract]
    public interface IRepoServices
    {
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<RasaPsa> VratiSveRasePasa();

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<Titula> VratiMoguceTitule();

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<Pas> VratiPse();

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<InfoOPsu> VratiInfoOPsima();

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        void SacuvajRasePasa(IEnumerable<RasaPsa> rase);

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<Kinolog> VratiKinologe();

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "VratiKinologe/{status}", ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<Kinolog> VratiKinologePoStatusu(string status);

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        void SacuvajKinologe(IEnumerable<Kinolog> kinolozi);

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)] 
        IEnumerable<FciGrupa> VratiSveFciGrupe();

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/PostojiPas/{brojRodovnika}/{idPsa}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] 
        bool PostojiPas(string brojRodovnika, string idPsa);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/VratiPsaPoBrojuRodovnika/{brojRodovnika}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] 
        Pas VratiPsaPoBrojuRodovnika(string brojRodovnika);

        [OperationContract]
        SnimiPsaResponse SacuvajPsa(Pas pas);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/VratiPsa/{id}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] 
        Pas VratiPsa(string id);

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        IEnumerable<Titula> VratiTitule();

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/VratiKinologaSaImenom/{deoImena}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        IEnumerable<Kinolog> VratiKinologaSaImenom(string deoImena);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/PretraziPse/", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        IEnumerable<Pas> PretraziPse();

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        void SacuvajKinoloskoDrustvo(KinoloskoDrustvo kinoloskoDrustvo);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<KinoloskoDrustvo> VratiKinoloskaDrustva();

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<Mesto> VratiMesta1();

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json)]
        void SacuvajMesto(Mesto mesto);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        KinoloskoDrustvo VratiKinoloskoDrustvoPoId(int id);

        [OperationContract]
        int SacuvajPodatkeOIzlozbi(Izlozba izlozba);

        [OperationContract]
        IEnumerable<Titula> VratiTituleIzlozbe(int idIzlozbe);

        [OperationContract]
        void SacuvajTituleIzlozbe(int id, int[] titule);

        [OperationContract]
        Izlozba VratiIzlozbu(int id);
    }
}
